<?php
/**
 * Created by PhpStorm.
 * User: Tsang
 * Date: 2017/9/24 16:20
 *
 */

namespace app\api\model;

use think\Model;

class Message extends Model
{
    protected $type = [
        'created_at' =>  'timestamp:Y-m-d H:i:s',
    ];

    /**
     * 获取消息
     * @param $original
     * @return mixed
     */
    public function getAll($uid)
    {
        $where = ['uid' => $uid];
        $where1 = ['tid' => $uid];
        $data = $this->where($where)->whereOr($where1)->select();
        return $data;
    }

}